<?php
!defined('P_W') && exit('Forbidden');

class PW_TypeDataFeed {
	function getData($config) {
		$num = (int)$config['num'] ? (int) $config['num'] : 1;
		$hid = (int)$config['hid'];
		return $this->_getData($hid,$num);
	}
	function _getData($hid,$num) {
		global $db;
		$feeddb = array();
		$query = $db->query("SELECT descrip FROM pw_house_feed WHERE hid=" . pwEscape($hid) . " ORDER BY postdate DESC ".pwLimit($num));
		while ($rs = $db->fetch_array($query)) {
			$rs['descrip']  = substrs($rs['descrip'],100);
			$feeddb[] = $rs;
		}
		return $feeddb;
	}
}
?>